﻿@model IEnumerable<string>
<script language="javascript" type="text/javascript">
    function onHostsSelected(data) {
        $("#Hosts").val(data.Object);
        $('#HostsDialog').dialog('close');
    }
</script>
@{
    AjaxOptions ajaxOpts = new AjaxOptions
    {
        HttpMethod = HttpVerbs.Post.ToString(),
        OnSuccess = "onHostsSelected"
    };
}
@using (Ajax.BeginForm(MVC.Reports.Filters.SaveHosts(), ajaxOpts))
{
    @Html.CheckBoxList("hosts",
                   x => x,
                   x => x,
                   x => x,
                   x => new string[] { })
    <input type="submit" value="Submit" />
}